package com.gxa.www.cl.mapper;

import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

@Mapper
public interface DrugMapper {

    @Select("SELECT name, lianxiren, dianhua, youbian, beizhu FROM 药品信息表")
    List<Map<String,Object>> getDrugs();

    @Delete("DELETE FROM 药品信息表 WHERE id = #{id}")
    void deleteDrug(Integer id);

//    @Insert("INSERT INTO 药品信息表 (name, lianxiren, dianhua, youbian, beizhu, status) VALUES (#{name}, #{lianxiren}, #{dianhua}, #{youbian}, #{beizhu}, #{status})")
//    @Options(useGeneratedKeys = true, keyProperty = "id")
//    int insertDrug(Drug drug);
}